package com.adu.retrofixtest.controller;

import com.adu.retrofixtest.domain.ParamEntity;
import com.adu.retrofixtest.domain.Result;
import com.adu.retrofixtest.service.RequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import retrofit2.Call;

import java.io.IOException;

@RestController
public class RetrofitController {
    @Autowired
    RequestService service;
    @GetMapping("/test")
    public void test() throws IOException {
        ParamEntity param=new ParamEntity();
        param.setName("都珍文");
        param.setEmail("2205411416@qq.com");
        Call<Result> resutl=service.save(param);
        System.out.println(resutl.execute().body());

    }
}
